<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<link media="screen" rel="stylesheet" href="<?php echo css_link('colorbox.css');?>" />
						<script src="<?php echo js_link('jquery.colorbox.js');?>"></script>
						<script>
		            	$(document).ready(function() {
		            		$(".view_map").colorbox({width:"420px", transition:"none"});
		            	});
		            	</script>
<div class="topurl">
        	<span class="left">
            	Bạn đang xem: <a href="<?php echo base_url();?>"><b>Trang chủ</b></a>  &raquo; <a href="<?php echo base_url().'show-room/';?>"><b>Show Room</b></a> &raquo; <a href="<?php echo base_url().'show-room/company/';?>" class="current"></b></a>
            </span>
            <?php $this->load->view('layout/support_sell');?>
        </div>
        <div class="main">
        	<div id="sidebar">
            	<?php
                    $this->load->view("layout/left");
                ?>
               
                <div class="btn-download"><a href="#"><img src="<?php echo img_link('i-download.gif');?>" alt="" title="" /></a></div>
            </div>
            
            <div class="b-sanpham">
            	<?php if(isset($products_info) && $products_info != null) {?>            	
				<h1><?php echo $products_info->name;?></h1>
                <div class="img-sp">
                	<?php $img_path = $this->home_model->get_images_products_by_product_id($products_info->id);?>                	
                	<?php if(count($img_path) > 0) {?>
                	<?php foreach($img_path as $k => $v){?>
                	<?php 
                		$root_img	=	base_url().str_replace('thumb_100-67/','',$v->img_path);
                	?>
                	<?php if($k == 0) {?>        	
                		<span class="big-thumb"><a class="view_map" title="" rel="prettyPhoto" href="<?php echo base_url().str_replace('thumb_100-67/','',$v->img_path);?>"><img onerror="this.src='<?php echo base_url().str_replace('thumb_100-67/','',$v->img_path);?>'" width="210" height="134" src="<?php echo show_thumb($v->img_path,'210-134');?>" id="big_thumps_pro" title="<?php echo $products_info->name;?>" alt="<?php echo $products_info->name;?>"/></a></span>
                			
                	<?php } else if($k == 1) {?>
                    	<span class="small-thumb">
                    		<a href="#">
                    			
                                <img onmouseover="show_big_thump('<?php echo show_thumb($v->img_path,'210-134');?>','<?php echo $root_img;?>');" width="70" height="45" src="<?php echo show_thumb($v->img_path,'100-67');?>" id="big_thumps_pro" title="<?php echo $products_info->name;?>" alt="<?php echo $products_info->name;?>"/>
                    		</a>
                    	</span>
                    <?php } else if($k == 2) {?>
                    	<span class="small-thumb">
                    		<a href="#">
                                <img onmouseover="show_big_thump('<?php echo show_thumb($v->img_path,'210-134');?>','<?php echo $root_img;?>');" width="70" height="45" src="<?php echo show_thumb($v->img_path,'100-67');?>" id="big_thumps_pro" title="<?php echo $products_info->name;?>" alt="<?php echo $products_info->name;?>"/>
                    			<!--
<img src="<?php echo show_thumb($v->img_path,'70-45');?>" title="" alt="" onmouseover="show_big_thump('<?php echo show_thumb($v->img_path,'218-210');?>');"/>
-->
                    		</a>
                    	</span>
                    <?php } else if($k == 3) {?>
                    	<span class="small-thumb end">
                    		<a href="#">
                                <img onmouseover="show_big_thump('<?php echo show_thumb($v->img_path,'210-134');?>','<?php echo $root_img;?>');" width="70" height="45" src="<?php echo show_thumb($v->img_path,'100-67');?>" id="big_thumps_pro" title="<?php echo $products_info->name;?>" alt="<?php echo $products_info->name;?>"/>
                    			<!--
<img src="<?php echo show_thumb($v->img_path,'70-45');?>" title="" alt="" onmouseover="show_big_thump('<?php echo show_thumb($v->img_path,'218-210');?>');"/>
-->
                    		</a>
                    	</span>
                    <?php }?>
                    <?php }?>
                    <?php }?>
                </div>
                <div class="infodetails">
                	<b>Mã hàng : <font color="#ed1b24"><?php echo $products_info->code;?></font></b><br />
                    <b>
                        Xuất xứ : <font color="#ed1b24"><?php echo $products_info->country;?></font>
                    </b>
                    <p>
                    	<?php echo $products_info->description;?>
                    </p>
                    <p>
                    	<span><font style="font-size:18px; font-weight:bold; color:#f0280c;">Giá: <?php echo format_type_money($products_info->price);?> VNĐ</font><br />
						<b>Khuyến mại công lắp đặt</b></span>
                        <a href="<?php echo base_url().'dat-hang/dat-hang/'.$products_info->code;?>" class="book">Đặt hàng</a>
                    </p>                    
                </div>
                <?php }?>
                
                <?php if(isset($products_orther) && $products_orther != null) {?>
                <div class="recommen-sp">
                	<div class="title">
                    	<span class="left"><b style="color:#ed1b24;">Sản phẩm cùng loại</b></span>
                        <span class="btn-page">
                        	<a href="#" onclick="sp.showPreviousPanel(1); return false;"><img src="<?php echo img_link('page-prev.gif');?>" title="" alt="Preview" /></a>
                        	<a href="#" onclick="sp.showNextPanel(1); return false;"><img src="<?php echo img_link('page-next.gif');?>" title="" alt="Next" /></a>
                        </span>
                    </div>
                    <ul class="splq"> 	                                                         
                    	<?php foreach($products_orther as $k => $v){?>		                    	
                    	<li>
                    		<?php $img_path = $this->home_model->get_images_products_by_product_id($v->id);?>
                    		<?php if($img_path != null) {?>
                    		<a href="<?php echo base_url().'show-room/detail/'.$v->id.'/'.$v->name_link.'.html';?>" title="<?php echo $v->name;?>">
                        		<img width="100" height="67" onerror="return this.src='<?php echo img_link("no_image.gif");?>'" src="<?php echo ($img_path ? show_thumb($img_path[0]->img_path,'100-67'): '');?>" title="<?php echo $v->name;?>" alt="<?php echo $v->name;?>" />
                        	</a>
                        	<?php } else {?>
                        		<img width="100" height="67" src="<?php echo img_link('no_image.gif');?>" title="" alt="" />
                        	<?php }?>
                            <span class="info">
                                <a href="<?php echo base_url().'show-room/detail/'.$v->id.'/'.$v->name_link.'.html';?>" title="<?php echo $v->name;?>"><?php echo $v->name;?></a><br />
                                <b style="color:#f0280c;"><?php echo format_type_money($v->price);?> VNĐ</b>
                            </span>
                        </li>		                        
                      	<?php }?> 	                    	                                    	                     
                    </ul>
                </div>
                <?php }?>                
            </div>            		
        </div>
        <script type="text/javascript" charset="utf-8">
			$(document).ready(function(){
				$("area[rel^='prettyPhoto']").prettyPhoto();
				
				$(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'normal',theme:'light_square',slideshow:3000, autoplay_slideshow: true});
				$(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'fast',slideshow:10000, hideflash: true});
		
				$("#custom_content a[rel^='prettyPhoto']:first").prettyPhoto({
					custom_markup: '<div id="map_canvas" style="width:260px; height:265px"></div>',
					changepicturecallback: function(){ initialize(); }
				});

				$("#custom_content a[rel^='prettyPhoto']:last").prettyPhoto({
					custom_markup: '<div id="bsap_1259344" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div><div id="bsap_1237859" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6" style="height:260px"></div><div id="bsap_1251710" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div>',
					changepicturecallback: function(){ _bsap.exec(); }
				});
				
			});
			</script>